﻿eventModule.controller("applicantsController", function ($scope, $location, EventService) {
    EventService.getVacancys().then(function (vacancys) { $scope.vacancys = vacancys }, function ()
    { alert('Error Occured.') });

    $scope.list = function () {
        var vacancy_id = $scope.item;
        EventService.getApplicants(vacancy_id).then(function (applicants) {
            $scope.applicants = applicants;
        }, function () { alert('Error occured.') });
    };

});